package com.bridge.bridge_wd.activity;

import android.view.View;

import com.bridge.bridge_wd.R;
import com.bridge.bridge_wd.databinding.ActivityXingbieBinding;
import com.bridge.common.base.BaseActivity;
import com.bridge.common.utils.UltimateBarXUtils;
import com.luck.picture.lib.tools.ToastUtils;

/**
 * @ClassName XingBieActivity
 * @Description TODO消息
 * @Author xushufeng
 * @CreateDate 2021/4/11 0011 13:37
 * @Version 1.0
 * @UpdateDate 2021/4/11 0011 13:37
 * @UpdateRemark 更新说明
 */
public class XingBieActivity extends BaseActivity {
    ActivityXingbieBinding binding;
    private String xingbie = "男";

    @Override
    protected int layoutId() {
        return R.layout.activity_xingbie;
    }

    @Override
    protected void initView() {

        binding = getBind();
        binding.titleView.setRightText("完成");
        binding.titleView.setRightTextVisible(true);
        binding.titleView.setRightTextColor(getResources().getColor(R.color.color_171515));
        binding.titleView.setRightTextViewOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.s(XingBieActivity.this, xingbie);
            }
        });
        binding.relativeNan.setOnClickListener(this);
        binding.relativeNv.setOnClickListener(this);
        binding.relativeQita.setOnClickListener(this);
        UltimateBarXUtils.setAppBar(this, true, true, R.color.color_f5f5f5);
    }

    @Override
    public void onClick(View view) {
        super.onClick(view);
        if (view.getId() == R.id.relative_nan) {
            binding.imageNan.setVisibility(View.VISIBLE);
            binding.imageNv.setVisibility(View.GONE);
            binding.imageQita.setVisibility(View.GONE);
            xingbie = "男";
        }
        if (view.getId() == R.id.relative_nv) {
            binding.imageNan.setVisibility(View.GONE);
            binding.imageNv.setVisibility(View.VISIBLE);
            binding.imageQita.setVisibility(View.GONE);
            xingbie = "女";
        }
        if (view.getId() == R.id.relative_qita) {
            binding.imageNan.setVisibility(View.GONE);
            binding.imageNv.setVisibility(View.GONE);
            binding.imageQita.setVisibility(View.VISIBLE);
            xingbie = "其他";
        }
    }

    @Override
    protected void setListenner() {

    }
}
